new functions stochasticGradientDescent and gradientDescentSeperated