Completion of exercise 13