modefied AllSort.java