finding occurrences of given word