HW4 binary search