refactor to pull config to external file