better handling of nonstandard csv