Switched to csv reader and writer