Rewrite a code