Exercise 5.39 ~ 5.40