adding exercise from page 25 - chapter 2