revert binary search changes