adding script used in IPOL demo