Updated exercise 9