reworked config handling