starts restructuring of code