Loops through the groups if multiple