ta, policy, m, s);

  case 'dCdp'
      [dd dy dh] = checkgrad(@conT8, policy.p, delta, policy, m, s);

end

function [f, df] = conT0(m, policy, s)                                  % dMdm
if nargout < 2
    M = policy.fcn(policy, m, s);
else
    [M, S, C, dMdm] = policy.fcn(policy, m, s);
    df = dMdm;
end
f = M; 

function [f, df] = conT1(m, policy, s)                                  % dSdm
if nargout < 2
    [M, S] = policy.fcn(policy, m, s);
else
    [M, S, C, dMdm, dSdm] = policy.fcn(policy, m, s);
  