changed quicksort and quicksort R