improve config generator