refactor to fully use Photo class