qsort like p57