passed lrCostFunction