refactored the menu builder