work on the getPhotos function, to retrieve album photos from the database