finally got the graph right