rewriting codebase