Instead of traversing the list of checked groups, can we just keep this list in memory and populate it with a new group as soon as the group is checked in the UI?