add StatisticWordFunctionalityTest
code refactor