implemented bigram feature in DOM