added preparePhoto