Sampling Update.
Unfortunately, I have concerns about the loop-ability of Nandhita's code. worked on my own sampling scheme, which seems to work.