code re-org to create new method for reading from CSV file