trie based router