Implementing evaluate to handle type Fraction