added limit to write_csv, renamed run_changes