added lots of tests for graphs with nodes instead of plain values