fixed initial processing of photo, changes caused for adaptation to aws