refactored code, initiated config file