added location and date to photo, refactored