ex2: costFunction regularized