update the register