refactored CSVbuilder build method and add tests for build method