Added Chapter 2 Sample Code