complete rewite of Config