implement fraction class