minor changes to masked insertion sort