udpates index