added readStats function to parse all the data and print the string. not sure if the output is correct