cleaning up poisson_grid function