added sgd code from bottou