add end event unmarshaling