refactor to use csv utils