insertion sort with binary search