altered function checking sampledata, for #322

altered function checking sampledata, for #322