various edits to fit_sgd function to homogenize with other functions