Added comments to data read function