immunity rewriting