sort class when scan