a data reader to read data in chunks