quicksort with partition