finding equilibrium