replaceRegister