refactored photo upload, commented functions findByUserId and addPhoto