Make event callbacks to take a trigger function