update binary search approach