function [cp,lp,hp,k,d,lambdap,wp,qh,qk,rl,rk,rd,cip,lip,hip,lambdaip,wip,b,mu,y,ik,h,ih,cb,tax,g,A,epsilonip,rn,D,mc,pistar,Pi,f1,f2,Y] = solvess_all(xx,habit,betap,betaip,ksih,LTV,alpha,deltak,deltah,iota,betab,gammab,rho_b,site,phi,epsilon,Bphi)


rd=1/betap-1;
rk=1/betap-1+deltak;
rl=1/betab-1;
qk=1;
qh=1;
N1=((1-betaip*(1-deltah))-LTV*((1-gammab)/betab+gammab/betap-1/betaip)*(betaip/(betaip*rho_b-1)));

eps1=ksih*(1-habit)/((1-betap*(1-deltah))*(1-habit*betap));
eps2=ksih*(1-habit)/((1-habit*betaip)*N1);


%%%%%%%%%% Steady State %%%%%%%%%%%%%%
qhyh_y=xx;
ci_y=(1-alpha)*iota/(1+(deltah+rl*(1-habit)*ksih/((1-habit*betaip)*N1))*eps2);
cb_y=(rl-rd*gammab)*LTV/(1-rho_b)*eps2*ci_y;
ik_y=deltak*alpha/rk;
ih_y=deltah*qhyh_y;
cp_y=1-ci_y-cb_y-ik_y-ih_y;

lp=((1-habit*betap)*(1-alpha)*(1-iota)/(1-habit)/site/cp_y)^(1/(1+phi));
lip=((1-habit*betaip)*(1-alpha)*iota/(1-habit)/site/ci_y)^(1/(1+phi));


A=1;
k_y=alpha/rk;
y=A*k_y^alpha*(lp^(1-iota)*lip^(iota))^(1-alpha);
cip=ci_y*y;
cp=cp_y*y;
cb=cb_y*y;
ik=ik_y*y;
ih=ih_y*y;
k=k_y*y;

Pi=1;
pistar=1;
mc=(epsilon-1)/epsilon;
D=1;
Y=y;

hp=eps1*cp;
hip=eps2*cip;
h=hp+hip;

lambdap=(1-habit*betap)/(1-habit)/cp;
lambdaip=(1-habit*betaip)/(1-habit)/cip;
mu=((1-gammab)/betab+gammab/betap-1/betaip)*(betaip/(betaip*rho_b-1))*lambdaip;

f1=lambdap*mc*Y/(1-betap*Bphi);
f2=lambdap*Y/(1-betap*Bphi);

wp=(1-alpha)*(1-iota)*y/lp;
wip=(1-alpha)*iota*y/lip;

b=LTV*hip/(1-rho_b);
g=0.2*y;
tax=g;
d=gammab*b;
rn=rd;
epsilonip=0;
end