fix: better config reading (i need unit tests...)