changed 2d arrays to 2d arraylists. seems to work