Implemented grouping in balance page.