updated line parser to use csv module