if .cfg is only use as an internal state, maybe we should use _cfg