sample application chapter 3