adding the functionality to read a partial file