code restructuring 2