addressed base case
binary search is functional