adding event parsing code snippet