replace all to use config class