removed the cost function \bar{M} and use just \M instead.