tasks of event handlers