updating register