implemented a more generic version of insertionSort and quicksort

can now work with all types of numbers