How International Law Works: A Rational Choice Theory