changed data structures to 2d arrays of Pixel objects rather than 2d arraylists