drawing the graph