changed how 2d array works