iRand() made global