main: correctly link vertex to event