changing array to variable