implement compare api
added compare shit