improved config setup