better traversing, mutable map -> trie