added an abstract factory for configs