add test for trie
trie transition matrix implementation