Added functionality for GROUPING