added code to read the raw data