Adding basic sampling support.