preprocess csv so it can be parsed