fixed bugs and can parse csv files