binary search the boundary