Use binary search