Coding a sampler

Thanks a lot @ben_serge! :slightly_smiling_face: And thank you for the help!