optional ordering of groups