added  sampling fn for large file - may not work depending on file structure