export event handlers into plugin.