quicksort solution