refactoring menu