found a couple bugs without using insertion sort, these have been corrected