archmangle's implementation of binary search