adding in output to csv, formatting, etc