added code so that the  number of indexes for each word will be added in front of all the indexes.