change in delete function