added program to sample from generic pdf