binary search refactored, unit tests added