Generic sampling support

Requesting integration of the fix for #96 - Generic Sampling Support