ips function