A reflex is a predictable, involuntary response to a stimulus. It was given this name in the eighteenth century because it appeared that the stimulus was reflected off of the spinal cord to generate the response, just as light is reflect by a mirror. Reflexes allow the body to respond quickly to internal and external changes in the environment in order to maintain homeostasis. Reflexes that involve the skeletal muscles are called somatic reflexes. Reflexes that involve responses of smooth muscle, cardiac muscle, or a gland are called visceral or autonomic reflexes.