Homeostasis refers to the process by which organisms regulate internal conditions to maintain a stable and constant environment. Negative feedback loops play an important role in homeostasis, as the response works to remove or reduce the stimulus to bring the regulated factor back to its normal range. Thermoregulation, the ability to maintain a stable body temperature, is an important example of homeostasis that allows for optimal biological functioning across different temperatures. Both behavioral and physiological mechanisms enable endothermic and ectothermic organisms to regulate their body temperatures.