added some comments to explain the demo