added code to read in data