code rewrite.