refactor main menu