how do nervous and endocrine systems respond to an increase in environment temperature to achieve homeostasis