adding quicksort function