re-wrote python scripts w/ csv module rather than string manipulation