sample_gamma function

sample gamma