attempting to implement ngram storage