demo_app from chapter 2