static factory method: from_config()