Chapter 2 demo_app from the book