added events to plugin