Add gradient descent. Not test yet