some updates to the logistic regression code