generate_menu was missing 'self'