refactoring submenu