decoding menus using types