lesson 3: bug fixes