Pectin is a polysaccharide that is the major binding component of the cell walls of plants and fruits. It consists of a long chain of pectic acid and pectinic acid molecules. When mixed with sufficient sugar, pectin forms a firm gel and is therefore much used as a thickening agent in the food industry, for example to set jellies and jams. Commercial quantities are obtained from citrus and apple wastes after removal of the juice. It is not digested, and is considered a beneficial dietary fiber.