The _______________ directs sensory messages to the cortex and transmits replies to lower brain structures.