Surrounding the top portion of the brainstem are the thalamus and the basal ganglia. The thalamus receives its major inputs from the sense organs and relays them to the sensory cortex for more sophisticated processing. Why we need a relay station is far from clear.