change delete function