the function of the excretory system is to help maintain homeostasis by