modify:reorganize the qsort