Add simple gradient descent routine