new operateFraction method for simplification