finished inclomete merge of photos.py file