Implemented a method for hash table lookup