started the delete function