refactored some code in donations and added function for deleting donations