Glycosylation is the process by which a carbohydrate is covalently attached to a target macromolecule, typically proteins and lipids. This modification serves various functions. For instance, some proteins do not fold correctly unless they are glycosylated. In other cases, proteins are not stable unless they contain oligosaccharides linked at the amide nitrogen of certain asparagine residues. The influence of glycosylation on the folding and stability of glycoprotein is twofold. Firstly, the highly soluble glycans may have a direct physicochemical stabilisation effect. Secondly, "N"-linked glycans mediate a critical quality control check point in glycoprotein folding in the endoplasmic reticulum. Glycosylation also plays a role in cell-to-cell adhesion (a mechanism employed by cells of the immune system) via sugar-binding proteins called lectins, which recognize specific carbohydrate moieties. Glycosylation is an important parameter in the optimization of many glycoprotein-based drugs such as monoclonal antibodies. Glycosylation also underpins the ABO blood group system. It is the presence or absence of glycosyltransferases which dictates which blood group antigens are presented and hence what antibody specificities are exhibited. This immunological role may well have driven the diversification of glycan heterogeneity and creates a barrier to zoonotic transmission of viruses. In addition, glycosylation is often used by viruses to shield the underlying viral protein from immune recognition. A significant example is the dense glycan shield of the envelope spike of the human immunodeficiency virus.