handling index operation for update