restored the source model sampling feature