getting positions of every unique word in collection