added logicSampling.js