how does a water pressure regulator work