reading the data from the file and parsing it