Flipped x and y axis for proper reading of the array.