patching gateway configuration, parametrizing