Reformat and grouping