improved setConfig