function to add fractions