minor edit to fit_sgd function