my implementation of insertion sort