Add methods .merge and .makeGroups