some exercises from chapter 3