changes to csvwriter to call formatter