improvements to gradient descent