added regularized cost