added exercise 3.45~3.47