update ips function