function resid = solve_steady_core(X, mu, the, w, wH, del, A, h, psy)

% given guesses, solve and verify

n = X;

K = n * (the/(1-the)) * (w/mu);

% given K we have I
I = K * del;

% this gives us output and consumption
y = K^the * (A*n)^(1-the);
c = y - I;

% c gives us cbar
cbar = (1-h)*c;

resid = wH - (cbar/(1-n)) * (psy/(1-psy));

end