add data sampling util