rewrite diff