updated binary search, edited test file for readability