There are three types of cofactors that help enzymes function: prosthetic groups, coenzymes, and activators. Prosthetic groups are organic molecules that attach permanently to enzymes, such as the heme group in hemoglobin which enables it to carry oxygen. Coenzymes are small non-protein molecules that assist in bonding between enzymes and substrates without being permanently attached, such as NAD which acts as a coenzyme for dehydrogenase enzymes. Activators are inorganic metal ions that temporarily attach to enzymes and alter the active site, including magnesium which helps synthesize proteins and calcium which aids nerve impulses and muscle contraction.