some notes for sgd