remove blind updation of rep in ensure_grouping