added a CSV data reader to avoid magic numbers in the code.