updated exercise 9