adjusted the quicksort and shellsort