finished updated sgd model