Added example code for chapter 4.4