finish quicksort