use ReplaceWithRegister