menu tool
restructured code