added a loop over all nodes to generate output. each event is ouput once
only, and a warning is issued where two events share a node.