678: move sample code to DemoBase