Merging changes to logistic_regression