add insertion sort optimized version