updated API and example due to spec changes