formatted time and added a delete method for photos