small update code restructuring