added event parsing