added trigger function for custom events