modify method to update photos table