how did fountains work before electricity