the pudding bacteria happened to produce an enzyme capable of taking electrons from a molecule called nadh and adding them to the double bonded nitrogen atoms in an azo dye, severing the bonds and breaking dye molecules apart into two colourless products. the loss of red colour caused the pudding to turn green.