1st implementation of insertion sort