chapter 2 demo application