write passing equilibrium code