rewrote index file