changed to 1D array