adds Rational class