speed up logistic regression