got something working. need to work on efficiency and poisson distribution