Completed exercise 12-4