finished Bisect. TODO: initialization code in near_far_pile, write driver code for test.