rewrote index

I rewrote the index for simplicity