function ff=findssFF_TAX(guess,params,taubar)


Kb = guess(1);
Kg = guess(2);
Lb = guess(3);
E  = guess(4);
taubar=taubar;

%Creating variables from the params structure
params_names     =   fieldnames(params);
nn=length(params_names);
for ii=1:nn
    eval([params_names{ii} '=params.' params_names{ii} ';']);
end;

Lg = (1 / 3^(1 + rhoL) - Lb^(1 + rhoL))^(1 / (1 + rhoL));
R = 1/betta;
Lambda = 1;
Qg = 1;
Qb = 1;

X = (E+erow)/(1-deltax);
dX = d2*(X)^2+d1*(X)+d0;

Yb = (1-dX)*Abar*Kb^(alfab)*Lb^(1-alfab);
Yg = (1-dX)*Abar*Kg^(alfag)*Lg^(1-alfag);
Y = ((1-alfayg)^(1/rhoy)*Yb^((rhoy-1)/rhoy)+(alfayg)^(1/rhoy)*Yg^((rhoy-1)/rhoy))^(rhoy/(rhoy-1));
pb=((1-alfayg)*Y/Yb)^(1/rhoy);
pg=(alfayg*Y/Yg)^(1/rhoy);
w = pg*(1-alfag)*(Yg/Lg);
Rkb = (1-dX)*Abar*(Kb/Lb)^(alfab-1)*alfab*(pb-taubar*gamaE)/Qb + (1-deltab);
Rkg = Rkb-(taub-taug)*R;
p  =  Rkb-(1+taub)*R;



ff1 = Rkg -(pg*(1-dX)*alfag*Abar*(Kg/Lg)^(alfag-1) + Qg*(1-deltag))/Qg;

ff2 = w - ((1-dX)*(1-alfab)*Abar*((Kb/Lb)^alfab)*(pb-taubar*gamaE));

ff3 = E - gamaE*Yb;

ff4 = (1-gama)*betta*(betta*p+zetta)*(gama*p+zetta) - kappab*(betta-gama)*((1-betta)*gama*p+(1-gama)*zetta);


ff=[ff1; ff2; ff3; ff4];


