reworked the config handling