improved py quicksort