rewrites all the classes and methods