insertion sort implemented with number mask