endocrine system: how it functions