added chapter 3's exercise 2