Draft implementation of insertion sort