

function F=ss_bmark(x,lambda,beta,alpha,chipp,chifw,xi,gamma,iota,psipp,psifw,pipp,eta,delta,tau_marg)

c=x(1); cdot=x(1);
lpp=x(2);  lppdot=x(2);
lfw=x(3); lfwdot=x(3);
h=x(4); hdot=x(4);
y=x(5); ydot=x(5);
wpp=x(6); wppdot=x(6);
wfw=x(7); wfwdot=x(7);
k=x(8); kdot=x(8);
r=x(9); rdot=x(9);


    % intertemporal euler solved in terms of r = rental price of capipptal
    F=[c^(-iota)-beta*cdot^(-iota)*(1+rdot-delta);
    
    hdot-lambda*((1-xi)*h+(h*lpp)^gamma);
    
    %intratemporal for non PPJ labor
    wfw*c^(-iota)*(1-tau_marg)-chifw*lfw^psifw;
    
    %wages
    wfw-k^alpha*(1-alpha)*(pipp*(h*lpp)^((eta-1)/eta)+(1-pipp)*lfw^((eta-1)/eta))^((1-alpha*eta)/(eta-1))*(1-pipp)*lfw^(-1/eta);
    
    wpp-k^alpha*(1-alpha)*(pipp*(h*lpp)^((eta-1)/eta)+(1-pipp)*lfw^((eta-1)/eta))^((1-alpha*eta)/(eta-1))*pipp*(h*lpp)^(-1/eta)*h;
    
    r-alpha*y/k;
    
    %intertemporal on labor supply
    (c^(-iota)*wpp*(1-tau_marg)-chipp*lpp^psipp)/(gamma*h*(h*lpp)^(gamma-1))- ...
        ((cdot^(-iota)*wppdot*(1-tau_marg)-chipp*lppdot^psipp)/(gamma*hdot*(hdot*lppdot)^(gamma-1)))*...
        beta*(1-xi+lppdot*(hdot*lppdot)^(gamma-1)*gamma);
    
    y-k^alpha*(pipp*(h*lpp)^((eta-1)/eta)+(1-pipp)*lfw^((eta-1)/eta))^((1-alpha)*eta/(eta-1));

    %resource constraint
    y-c-kdot+(1-delta)*k];

end


