common denominator works with a for