modified ivy script