made changes to exercise 6 and exercise 7