randomInt function