start moving common funcs to util
regularized logistic regression