demo_app in Chapter 2