added event handlers to event elements.