extracted initMenubar