refactored find photo method