Exercises from chapter 2