completed exercise 8-1n