fixed binary_search bug that Ed caught