now looks at each word instead of each line