refactor PhotoDelegate