added function that seeks for every occurence of a given word in the text