how does cavitation work