working on ngrams, patterns and regex