Completed exercise 4.6