add sum-to-x and fix bugs in merge sort and binary search