superficial structure in the skin that detects external stimuli