updaing index