added general-use delete function to database model