Random Sampler Implementation

No. The issue still remains. I updated the code for better understanding.
If you want i can post outputs as well.