Damaged or diseased kidneys are not capable of removing toxic waste substances from the body. Kidney dialysis removes the nitrogenous waste and regulates the pH of the blood when the kidneys do not work. Blood is pumped from an artery through a series of tubes made of a permeable membrane and a special solution; urea and excess salts diffuse out of the blood as it circulates through the dialyzing machine and are then discarded. Necessary ions diffuse from the solution back into the blood, and the cleansed blood is then returned to the body.