The kidneys remove waste from the blood in the form of urea and regulate water and electrolyte balance. Each nephron acts as the functional unit of the kidney, filtering blood in the cortex and reabsorbing useful substances along the tubule in the medulla. Urine is stored in the bladder and released through the urethra. Dialysis can temporarily perform the functions of damaged kidneys by filtering blood through a semipermeable membrane. A kidney transplant is the best long term treatment but requires immunosuppressant drugs to prevent rejection by the recipient's immune system.