Updaging exercise 5.17, solution 5.18, and summay