restructuring of code