Exercise 5.47 and part of 5.48