fixed the quicksort