restructuring the source code