implemented ngram addition