Source code for chapter 02