refactoring menu use