refactoring before adding submenus