Exercise 4.4 - fixed errors