wrap the grouping logic into split method which allows users to browse the groups before the actual merging #2