updates to demo code