add rational class