added the delete function