refactoring MenuBar