first draft of quicksort partitioning