Why do you need to sort the groups?