sortGroups debug