moving insertion sort