added the 2nd method and improved the visualization of graph with strokeprop method