refactoring initMenu()