implement binary search
add two test cases
add comments