testing a binsearch algorithm