gradient descent for multiple vars