reorgranize menu code;