several versions of quicksort