add test for sampling