added simplified reduceOnEdges without the vertex value