binary search now works!