Use binary search, need practice