Homework for chapter 3