refactoring to use csv, and codecs modules