Finish exercise 5.1