Add tests & fix gamma distribution