sweating is regulated by the sympathetic nervous system in response to environmental stimuli, such as heat or cold temperatures. When body temperature increases due to exposure to excess heat (hyperthermia), sweating occurs in order to return it back towards normal levels. The sympathetic nervous system also has a role in keeping the core of the body warm enough when exposed to minimal ambient temperatures (hypothermia). Conversely, if the environment becomes too cool, there will be an increase in perspiration resulting from hyperventilation and shivering. Sweating can occur for other reasons than just maintaining homeostasis, such as feelings of anxiety when exposed to something that might cause harm or fear of being judged by others. In these instances, excessive sweating would help users decrease their anxiety and avoid social embarrassment—similar effects have been observed with drug use.