added general logistic regression