upgraded summary functions to support grouping