controlling the composition of blood and eliminating wastes