example working on graph