Added code to find matches in Trie