Rewrite code using bigram