Adding sampling to quantgen.