Update example to new api