Implementing binary search version of chop