switched to 2d array