new function to extract trigger data