functional csv

Previous version was messed up, since I uploaded it from Hannah's git branch. This version is the most up_to_date.