changed how photo.path is defined