got binary search to work