code duplicated to test for Poisson distribution, bug fix in belt intersection