creating a grid for the photos