removed example trie code and replaced copyOf methods with Java default