Exercise 1 solution