Unlike the midbrain tectum (which is a sensory structure located posteriorly), the midbrain tegmentum, which locates anteriorly, is related to a number of motor functions. Within the tegmentum, the red nucleus is in charge of motor coordination (specifically for limb movements) and the periaqueductal gray matter (PAG) contains critical circuits for modulating behavioral responses to pains. The substantia nigra (black substance) serves an important role in rewarding behaviors such as approaching desired objects.