triggerEvent method refactoring