couple of exercises from chapter 2