refactors menu.