binsearch2 and binsearch3