demo code runs ok