add config class
refactoring