sync demo with latest code