revert code pre-csv