switch when and where I get the registered message code