refactor binarySearch contains

refactored BST contains. 
instead of map, it should be each.