approach for generating menus dynamically