break things out into a getPhotos function.