The brain is composed of areas of gray and white matter and consists of various regions, including the cerebral cortex, the thalamus, the hypothalamus, the brain stem, and the cerebellum. The sensory areas of the cerebral cortex are involved in perception of sensory information: motor areas control
execution of voluntary movements and association areas deal with complex integrative functions such as memory, personality traits, and intelligence. The limbic system promotes a range of emotions including pleasure, pain, affection, fear, and anger. The thalamus relays almost all sensory input to the cerebral cortex: it contributes to motor functions by transmitting information from the cerebellum and basal nuclei to motor areas of the cerebral cortex. It also plays a role in maintaining consciousness. The hypothalamus controls and integrates activities of the autonomic nervous system: it regulates emotional and behavioral patterns and circadian rhythms. The cerebellum smoothes and coordinates contractions of skeletal muscles, regulates posture and balance, and may have a role in cognition and language processing.