add word frequency; need tests