WIP: add compare api.