test for reducing fractions