finished implementing regularized logistic regression