add regularization for logistic regression