uncomment line to write csv
fixed bug where i was subsetting NA values