sort and check point