now from_file can read segment of the file only