Help with shared arrays - code update