original csv code was written for Python 2.7; need to update for Python 3.2