updated to work with v1 api, dep on libcif