factor out configu