update the delete function of aa tree