Refactore reading csv