we can use binary search to speed up