Updated exercise 4.6