added implementation for fractions