super hacked up version that barely works.  csv formatting needs work.