commit binary search algorithm