optimize the config class