update demo with latest code