working on graph generating