updated word count and put each_word back in