Completed exercise 4.2