how do endocrine, nervous and reproductive systems work together to develop genitals?​