Exercise 2 - bug fix