implement remote docs and queries