fixed setting arrays in method