completed exercise 6.4