fixing the grouping