restructured code in accordance with the requirements of bundle