code restructuring