added retrieve a list of positions of words in the document