rewrite get_photo