making a copy of the index