changed this example to reflect the current API

Hey Stefan,

I'm really struggling with the gap between the docs/tutorial and the current state of the project, so to teach myself cubes I'm trying to update various examples and tutorials.  If my changes show confusion on my part let me know, but I had to make the following changes to get this example working.  Any pointers would be greatly apprenticed.