Added quicksort to speed up