examples here need to be updated to use the new api