boilerplate for insertion sort