finish grouping