histgram functions for bigrams & trigrams added