trie.py updated to lookup exact nodes