implemented word counts