clean up header handling in csv