move trie to util