added quicksort partition code