This part of the nervous system is called autonomic nervous system (ANS). ANS is part of the peripheral nervous system which consists of nerves and ganglia which are located outside the central nervous system-CNS (brain and spinal cord). The main function of ANS is to control the function of internal organs, like smooth muscles or glands. It works unconsciously and regulates functions like the heart rate, digestion, respiratory rate, pupillary response, urination, and sexual arousal. The components of ANS are the sympathetic nervous system (control of the fight-or-flight response) and the parasympathetic nervous system ( the "rest and digest").