Update chapter 2 sample application