improved the graph path representation