support a config struct