function ff = findsstiming(guess)
global  betac sigman chik epsilon_n deltac deltac_g alphac_b alphac_g omegab omegag epsilon_k epsilon_b epsilon_g ... 
        phi_1 phi_2 phi_3 d0 d1 d2 delta_x em_row delta_nw taubar iota_w gamma_w ab_ss ag_ss    epsa_ab_bar rho_ab
        %%gamma_w gamma_bank iota_w rho_r phi_pi phi_y rho_ab rho_ag r_ss
        %%pi_ss sigmac gamma_I gamma_k 

kb=guess(1);
nb=guess(2);
em=guess(3);
nw=guess(4);

r=1/betac;
ab=ab_ss; %%*exp(epsa_ab_bar/(1-rho_ab)); %%ab=ab_ss
rl=r;
x=(em+em_row)/(1-delta_x);
dmg=d0+d1*x+d2*(x^2);
yb = ab*(1-dmg)*(kb^alphac_b)*(nb^(1-alphac_b));
%%rkb=(epsilon_b/(epsilon_b-1))*r;
rkb=r;
prf=(rkb-r)*kb+r*nw;

ff1=kb/nb-((alphac_b*(1-dmg)*ab)/(rkb+deltac-1))^(1/(1-alphac_b));
ff2=chik*(nb^sigman)-(1-alphac_b)*(yb/nb);
ff3=em-phi_1*yb;
ff4=delta_nw*nw-prf;
ff=[ff1, ff2, ff3, ff4];