monkeypatch for api