revamp enumerateGroups