improved config generator