moving qsort