add tests for word's frequency