added fast method for checking if trie contains a substring of a given word; fixed constructor with words which was double-counting words