added functionality for displaying photos in albums