updating indices