completed exercise 7-1 index