BJ: added dump_csv method