fixed example to match new api