added an insertion sort algorithm