add global menu
refactoring