The Reticular Activating System is located inside the brain stem. It is a set of nuclei that is responsible for arousal and sleep-wake transitions. It connects the brain stem with the cortex and contains the hypothalamus. Since the RAS is highly crucial to survival, it still operates even while a person is undergoing hypnosis. It helps a person transition from relaxation to periods of high attention. It also plays a role in pain responses. Premature birth and smoking can affect the function of the RAS.