Finished the logistic regression