fixed the bug not reading the data file