How does the spinal cord work