Creating Randomize function