move poisson-related functions to a separate module