better encapsulate configuration, support current format