verified demo code compiles and runs correctly