Quicksort done the right way