Replacing the index