Finish exercise 5.6.1