quicksort with pointers