Rewrite network code