couple of exercises from chapter 3