The brain stem and the hypothalamus (which sits directly above it) together control the energy levels of the body. They coordinate the functioning of the heart and lungs and also the endocrine and immune systems, ensuring that these basic life-sustaining systems are maintained within the relatively stable internal balance known as homeostasis.