Completed exercise 10.5