How does the digestive system help maintain homeostasis