Completed exercise 3.24