working stochastic gradient decent