only write to output if it is a proper factor