Implemented hash search along with tree search