Wrote quicksort