Trie implemented and tested