Added delete function for database