sort classes