location stuff. binary search broken