Updated exercise 4