Add support for sample with return

Add support for sampling with return (using poisson distribution)