refactor the menu bar