lab7 through exercise 3