coded up logistic regression model