code rewritting