maybe examples are outdated?

While trying to run your examples I had to change some code.

Maybe this is what it should rather be now?

cheers,
Ronny