begin config refactor