added bigram frequency analysis, fixed bugs