update samples from chapter 9