How does the pain signal travel from the periphery to the spinal cord