updated the demo with lots of comments