refactored the logistic regression models