update menubar logic