update sample code after rewriting the chapter 7
Merge branch 'chap7storage'