How does the nervous system work with the endocrine system?