minor edits to base_sgd functions