Gatekeeper rewrite