Exercise 2 Solution (previous commit was not correct)