adding graphs for gradient descent