how does the excretory system help the body maintain homeostasis