toFraction method added