Functions for inputting data from a CSV file