made test for graph reduce more robust by returning name values from the nodes