Made logistic regression work