refactor, class
config is a promise
config is a promise