implement loading and saving of photos