added decode n-grams