How does a backflow prevention device work to protect the water supply?