while loop binary chop