small refactoring, moved config to json file