Added position of word in document logic.