wrap config with an anonym function