refactor: make connfig & more global