fixed quicksort, added kth largest