modified N grams