Updated random function from normal to poisson