add csv saving, untested