adding rng shuffle, optimizing the code....Swathi