added word count method