add more comments in the demo code