test mapGroup refactoring