Wrote the new index