Add more logic for CompareGroups