working update of graph