added template for matchGrouping