refactor of config to custom variable