figuring out how to make a delete function