and same for default config.
This looks like duplicated code, there shoudl be a way to factor all in one place.