add gradient descent algorithm