Solution for Chapter 2