quicksort partition method is added