improve settings-generator code
improve settings-generator code - part 2