initial implementation adapted from CHCSVParser