demo_app in chapter 2