add gradient descent method