added csv dumping capability