initialized the randomizer function