plugin converted to fire custom events