trying to fix binsearch