How IPS works