add sort for all test cases