added the Rational class from chapter 6