refactoring parts of event handling into object method