Adding squared cost.