refactor update config