binary search and merge sort