fix exercise 2.29 (e)

fix exercise 2.29 (e)