Finished problem 2.5 (insertion sort implementation)