variable rewrite