fixed bug in parsing the data