delete func to remove entity