updated example to match new construct and new api calls