Final hw47 version of InsertionSort