working version of read_data.R