The nervous system and endocrine system are similar because both