referring function truncatedata from cleanupmodel (sampledata-model)