Could we make getTitle a method of some webpage object? Then the event handler could set the webpage instance's title attribute. Webpages could have class variables that kept track of the total number of webpages created and the total number that had titles.