refactor csv tool as a builder pattern