making the changes in the index