Added logic to select and view photo from list