read from CSV refactor