Exercises from chapter 4