grouped and ordered properly