restructured code