the solution for Exercise 4.3.27 revised.