modification of insertion sort