word count function took out query function