sample app; chapter 3