[IMP] improve code in res_config