search working in trie