Completed exercise 5.14