first version of toSimpleGroupedTable method