fixed read in function for fractions