rewrite source code