Finished implementing delete function