rewrote index