completed exercise 6-5n