sgd now running with single thread