First exercise from chapter 7