moved config into a class