Updated exercise 6