refining binary search with testing adjustments