new api and internals - supports revisions