insert and search in a Trie