euler on fractions. need to be a lot faster