Document how grouping is done