move word_count to parent class