_app and _kitchen generation function