use new style classes in trie.py