rewrite the linear least square fitting
modify to l2 regularization