the second function of the dam is to provide electricity. the dammed water drives a water turbine and generator. it still works today. this technology (hydroelectricity) had been invented in the 19th century in england and germany, and was by 1900 used in the usa and most european countries.