quicksort function complete